package com.yc.jpa.dao;

import java.util.List;
import org.springframework.data.repository.Repository;
import org.springframework.data.repository.query.Param;
import com.yc.entity.Student;

public interface StudentDao extends Repository<Student, Integer> {
	
	List<Student> findByNameAndTel(String name, String tel);

	/**
	 * 通过在实体类中定义查询语句，可以在任意spring-data jpa方法中调用
	 * @param myTel
	 * @return
	 */
	List<Student> findMyTel(@Param("myTel")String myTel);
	
	List<String> findAllTel();
	
}
